import { IFormAbility } from '../ability';
import { FormActionType } from '../event';
import { IDECtrlControllerParams } from './i-de-ctrl-controller-params';

/**
 * 编辑表单控制器输入参数接口
 *
 * @export
 * @interface IFormControllerParams
 * @extends {IWidgetsControllerParams}
 */
export interface IFormControllerParams<T, A extends IFormAbility>
	extends IDECtrlControllerParams<T | FormActionType, A> {
	/**
	 * 表单校验
	 *
	 * @type {Function}
	 * @memberof IFormControllerParams
	 */
	formValidate: () => Promise<boolean>;

	/**
	 * 表单项校验
	 *
	 * @type {Function}
	 * @memberof IFormControllerParams
	 */
	formValidateFields: (name: string[]) => Promise<boolean>;
}
